package cn.yshujia.domain.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

/**
 * @author YShuJia
 * @create 2024/12/20
 * @description Like
 */

@Data
@TableName ("t_like")
@Schema (name = "Like", description = "点赞记录")
public class Like implements Serializable {
	
	@Serial
	private static final long serialVersionUID = 1L;
	
	public Like (Long userId, Long sourceId) {
		this.userId = userId;
		this.sourceId = sourceId;
	}
	
	@Schema (description = "主键")
	@TableId (value = "id", type = IdType.AUTO)
	private Long id;
	
	@Schema (description = "用户ID")
	@TableField ("user_id")
	private Long userId;
	
	@Schema (description = "源ID")
	@TableField ("source_id")
	private Long sourceId;
	
	@Schema (description = "是否启用 1 启用 0 停用")
	@TableField ("`status`")
	private Boolean status;
	
	@Schema (description = "创建时间")
	@TableField (value = "create_time", fill = FieldFill.INSERT)
	private Date createTime;
}
